#pragma once

#include "read.h"
#include "write.h"

namespace sfc::io {

struct File {
  using fd_t = int;
  fd_t _fd;

  explicit File() noexcept;
  explicit File(fd_t fd) noexcept;
  File(File&& other) noexcept;
  ~File();

  auto read(Slice<u8> buf) -> usize;
  auto write(Slice<const u8> buf) -> usize;
};

}  // namespace sfc::io
